<template>
	<view class="Change_phone">
		<view>
			<p style="border-bottom: 1px solid #F0F0F0;">请输入手机号<input style="" type="number" v-model="form.mobile"></p>
			<p>请输入验证码<input type="number" style="text-align: center;" v-model="form.code"><span>获取验证码</span></p>
		</view>
		<button @click="changeMobile">修改手机号</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					mobile: "",
					code: ""
				}

			};
		},
		methods: {
			changeMobile() {
				this.$httpRequest('/user/changeMobile', this.formL).then(res => {
					uni.showToast({
						icon: "success",
						title: "更换成功",
						duration: 2000
					})
					uni.switchTab({
						url: "/pages/user/user"
					});
				});
			},
		},
	}
</script>

<style lang="less">
	.Change_phone {
		padding-top: 28rpx;

		&>view {
			width: 690rpx;
			padding: 20rpx;
			box-sizing: border-box;
			border-radius: 20rpx;
			background: #fff;
			margin: 0 auto;

			&>p {
				width: 100%;
				height: 86rpx;
				display: flex;
				align-items: center;
				font-size: 13px;

				&>input {
					flex: 1;
					height: 100%;
					font-size: 13px;
				}

				&>span {
					color: #3B7933;
				}
			}
		}

		&>button {
			width: 690rpx;
			height: 80rpx;
			line-height: 80rpx;
			color: #fff;
			background: #5FC07B;
			font-size: 15px;
			margin-top: 160rpx;
		}
	}
</style>